﻿using System.Linq;
using BankCreditPortfolio.DAL.Entities;

namespace BankCreditPortfolio.DAL.Services
{
    public class DepositTypeService : DataService<DepositType>
    {
        public DepositType GetByTitle(string title)
        {
            var filteredQuery = this.CreateQuery().Where(x => x.Title == title);
            return filteredQuery.Count() > 0 ? filteredQuery.Single() : null;
        }
    }
}